package com.yxh.www.author.dto;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  资源树形数据
 * </p>
 *
 * @author yangxiaohui
 * @since 2020/5/12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SmResourceTree implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * PK
     */
    private String id;

    /**
     * 资源标题
     */
    private String resourceTitle;

    /**
     * 资源图标
     */
    private String resourceIcon;

    /**
     * 资源路径
     */
    private String resourcePath;

    /**
     * 父级ID
     */
    private String parentId;

    /**
     * 权限标识
     */
    private String permissionKey;

    /**
     * 资源（0：目录；1：菜单；2：按钮）
     */
    private String resourceType;

    /**
     * 资源状态
     */
    private String resourceStatus;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 排序编号
     */
    private Integer orderNumber;

    private List<SmResourceTree> children;

    public SmResourceTree() {
    }

    public SmResourceTree(String id, String resourceTitle, String resourceIcon, String resourcePath, String parentId, String permissionKey, String resourceType, String resourceStatus, LocalDateTime createTime, Integer orderNumber) {
        this.id = id;
        this.resourceTitle = resourceTitle;
        this.resourceIcon = resourceIcon;
        this.resourcePath = resourcePath;
        this.parentId = parentId;
        this.permissionKey = permissionKey;
        this.resourceType = resourceType;
        this.resourceStatus = resourceStatus;
        this.createTime = createTime;
        this.orderNumber = orderNumber;
    }
}
